package com.ezmobo.core.database;

/**
 * 上下文Holder
 *
 */
public class ContextHolder {

	private static final ThreadLocal<String> contextHolder = new ThreadLocal<String>();

	private static final String MIMICAM_DB = "mimidb";
	private static final String MANAGER_DB = "managerdb";

	public static void setMimiDB() {
		contextHolder.set(MIMICAM_DB);
	}

	public static void setManagerDB() {
		contextHolder.set(MANAGER_DB);
	}

	public static String getContext() {
		return contextHolder.get();
	}

	public static void clear() {
		contextHolder.remove();
	}
}